# Dockerfile配置属性

# 使用指定JDK版本作为基础镜像
FROM  openjdk:8-jdk-alpine

# 定义版本号标签
LABEL  version=0.2.24

RUN set -xe \
&& apk --no-cache add ttf-dejavu fontconfig

# 设置工作目录,jar程序,以及程序运行期间所产生的文件都在容器这个目录内
WORKDIR  /opt/iot-master

# 将Dockerfile文件在同一目录下的jar包复制到容器的/app目录下
COPY  ./iot-admin/target/iot-admin.jar  /app/iot-admin.jar

ENV TZ=Asia/Shanghai

#ENV JAVA_OPTS="\
#-Dcom.sun.management.jmxremote=true \
#-Dcom.sun.management.jmxremote.rmi.port=28000 \
#-Dcom.sun.management.jmxremote.port=28000 \
#-Dcom.sun.management.jmxremote.ssl=false \
#-Dcom.sun.management.jmxremote.authenticate=false \
#-Dcom.sun.management.jmxremote.local.only=false \
#-Djava.rmi.server.hostname=192.168.6.228"

# 暴露应用程序的端口,与YML server.port 一致
EXPOSE  18082

# 启动应用程序
#ENTRYPOINT  ["java", "-Xmx2048m", "-Xms512m","$JAVA_OPTS","-jar", "/app/iot-admin.jar"]
ENTRYPOINT  ["java", "-Xmx2048m", "-Xms512m","-Dcom.sun.management.jmxremote=true", "-Dcom.sun.management.jmxremote.rmi.port=28000","-Dcom.sun.management.jmxremote.port=28000","-Dcom.sun.management.jmxremote.ssl=false","-Dcom.sun.management.jmxremote.authenticate=false","-Dcom.sun.management.jmxremote.local.only=false","-Djava.rmi.server.hostname=192.168.6.228","-jar", "/app/iot-admin.jar"]